﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.mssql;

namespace SharpSqlAnalyzer.stmt.mssql
{
	// Token: 0x02000186 RID: 390
	public class TMssqlSetRowCount : TCustomSqlStatement
	{
		// Token: 0x17000283 RID: 643
		// (get) Token: 0x06000DBB RID: 3515 RVA: 0x0030909A File Offset: 0x0030729A
		// (set) Token: 0x06000DBC RID: 3516 RVA: 0x003090A2 File Offset: 0x003072A2
		public virtual TExpression NumberExpr
		{
			get
			{
				return this.numberExpr;
			}
			set
			{
				this.numberExpr = value;
			}
		}

		// Token: 0x06000DBD RID: 3517 RVA: 0x003090AB File Offset: 0x003072AB
		public TMssqlSetRowCount(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmssqlsetrowcount;
		}

		// Token: 0x06000DBE RID: 3518 RVA: 0x003090BF File Offset: 0x003072BF
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			this.numberExpr = ((TSetRowCountSqlNode)this.rootNode).RowNumber;
			return 0;
		}

		// Token: 0x06000DBF RID: 3519 RVA: 0x003090EA File Offset: 0x003072EA
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000DC0 RID: 3520 RVA: 0x003090FA File Offset: 0x003072FA
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			this.numberExpr.accept(v);
			v.postVisit(this);
		}

		// Token: 0x0400131B RID: 4891
		private TExpression numberExpr;
	}
}
